#include "mdb_data.h"

void set_tempc_upload(void *dpattr, dp_obj_t *dp)
{
	int value = dp->value.dp_value;

	dp->value.dp_value = (int)(value);	
}

void set_tempc_download(void *dpattr, dp_obj_t *dp)
{
	int value = dp->value.dp_value;

	dp->value.dp_value = (int)(value);
}


struct mty_dpattr_t mty_dpattr[DPID_NUM] = {
	[0] = {.type = PROP_VALUE, .rdwr = RDWR,  .dp_id = DPID_SET_LED, .db_addr = 0x1000, 
	 .upload_hook = set_tempc_upload, .download_hook = set_tempc_download},
};



struct mnode mdb_nodes[DBTYPE_MAX] = 
{
	[LED0        ] = {.addr = 0x1000, .defv =   1, .min =   0, .max =   1, .step =  1, .flag = MODULE_TUYA, .name = "led"},
};

